<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.xea.service.ServiceFactory"%>
<%@page import="com.xea.service.ChannelService"%>
<%@page import="com.xea.model.Channel"%>
<%@include file="../../inner/head.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<link type="text/css" rel="stylesheet" href="${basepath}/res/images/style.css" />
<script src="${basepath}/res/js/dtree/outerdtree.js"></script>
<link type="text/css" rel="stylesheet" href="${basepath}/res/js/dtree/outerdtree.css" />
<style type="text/css">
	body {
		margin:0px;
		padding:0px;
		height: 100%;
		width: 100%;
		padding: 0px;
	}
	.dtree A {
		color: #000000;	
	}
	.dtree{
		color: #000000;
	}
	.treeScrollDiv {
	  overflow-x:auto;
	  overflow-y:auto;
	  scrollbar-face-color : #EDEDED;
	  scrollbar-darkshadow-color : #EDEDED;
	  height: 100%;
	  width: 100%;
	  text-indent: 20px;
	}
	
</style>
<body>
	<div id="list_l"> 
		<div style="border: #cbc9ca 1px solid;margin-right: 5px;">
			<h2 class="h2title">Product</h2>
			<div style="padding-left: 5px;">
				<script type="text/javascript">
		  			outertree = new dTree("outertree");
		  			var i=0;
		  			outertree.add(0,-1,"");
		  			<%
		  				ChannelService channelDao=ServiceFactory.getChannelService();
		  				List list = channelDao.search();
		  				for(int i=0;i<list.size();i++){
		  					Channel channel = (Channel)list.get(i);
		  					if(channel.getParentId()==0){
		  			%>
		  					outertree.add(<%=channel.getId()%>,<%=channel.getParentId()%>,"<span class='menu<%=channel.getParentId()%>'>&nbsp;<%=channel.getName()%></span>","${basepath}/outer/product.jsp?channelId=<%=channel.getId()%>","<%=channel.getName()%>");
		  			<%}else{%>
		  					outertree.add(<%=channel.getId()%>,<%=channel.getParentId()%>,"<span style='color:#444444;'>├&nbsp;<%=channel.getName()%></span>","${basepath}/outer/product.jsp?channelId=<%=channel.getId()%>","<%=channel.getName()%>");
		  			<%}}%>
					document.write(outertree);
					outertree.config.closeSameLevel=true;
					outertree.openAll();
				</script>
			</div>
		</div>
		<div id="chat" style="border: #cbc9ca 1px solid;height: 248px;margin-top: 20px;margin-right: 5px;">
			<h2 class="h2title">Live Chat</h2>
			<div class="inner">
				<ul>
					<li class="chatmsn"><a href="msnim:chat?contact=sally1981cn@163.com" target="_blank" style="font-size: 12px;color: #353535;">online service</a></li>
							<li class="chatskype"><a href="skype:kelly_suxiaoyun-SKYPE?call" target="_blank" style="font-size: 12px;color: #353535;">Talk with us</a></li>
							<li class="chatalibaba"><a href="http://amos.us.alitalk.alibaba.com/msg.aw?v=2&uid=xmkelly&site=enaliint&s=5" target="_blank" style="font-size: 12px;color: #353535;">XEK on Alibaba.com</a></li>
							<li class="chatemail"><a href="mailTo:kelly@xekfurniture.com" target="_blank" style="font-size: 12px;color: #353535;">kelly@xekfurniture.com</a></li>
				</ul>
			</div>
		</div>
	</div>	
</body>
